/**
 * Qilin-web通用样式类
 * @author Qilin
 * @createDate 2025-01-20
 * @lastUpdateDate 2025-01-20
 */
@use "./base.scss";

// 外边距、内边距辅助类
@mixin distance($num,$attribute){
    @if $attribute == m {
        .qilin-#{$attribute}-#{$num}{
            margin:0.02rem * $num !important;
        }
    } @else if $attribute == ml {
        .qilin-#{$attribute}-#{$num}{
            margin-left:0.02rem * $num !important;
        }
    } @else if $attribute == mr {
        .qilin-#{$attribute}-#{$num}{
            margin-right:0.02rem * $num !important;
        }
    } @else if $attribute == mt {
        .qilin-#{$attribute}-#{$num}{
            margin-top:0.02rem * $num !important;
        }
    } @else if $attribute == mb {
        .qilin-#{$attribute}-#{$num}{
            margin-bottom:0.02rem * $num !important;
        }
    } @else if $attribute == mx {
        .qilin-#{$attribute}-#{$num}{
            margin-left:0.02rem * $num !important;
            margin-right:0.02rem * $num !important;
        }
    } @else if $attribute == my {
        .qilin-#{$attribute}-#{$num}{
            margin-top:0.02rem * $num !important;
            margin-bottom:0.02rem * $num !important;
        }
    } @else if $attribute == p {
        .qilin-#{$attribute}-#{$num}{
            padding:0.02rem * $num !important;
        }
    } @else if $attribute == pl {
        .qilin-#{$attribute}-#{$num}{
            padding-left:0.02rem * $num !important;
        }
    } @else if $attribute == pr {
        .qilin-#{$attribute}-#{$num}{
            padding-right:0.02rem * $num !important;
        }
    } @else if $attribute == pt {
        .qilin-#{$attribute}-#{$num}{
            padding-top:0.02rem * $num !important;
        }
    } @else if $attribute == pb {
        .qilin-#{$attribute}-#{$num}{
            padding-bottom:0.02rem * $num !important;
        }
    } @else if $attribute == px {
        .qilin-#{$attribute}-#{$num}{
            padding-left:0.02rem * $num !important;
            padding-right:0.02rem * $num !important;
        }
    } @else if $attribute == py {
        .qilin-#{$attribute}-#{$num}{
            padding-top:0.02rem * $num !important;
            padding-bottom:0.02rem * $num !important;
        }
    }
};

@for $i from 1 through 50 {
    @include distance($i,m);
	@include distance($i,ml);
	@include distance($i,mr);
	@include distance($i,mt);
	@include distance($i,mb);
	@include distance($i,mx);
	@include distance($i,my);
	@include distance($i,p);
	@include distance($i,pl);
	@include distance($i,pr);
	@include distance($i,pt);
	@include distance($i,pb);
	@include distance($i,px);
	@include distance($i,py);
}

// 主题样式文本
.qilin-text-primary{
    color:var(--qilin-color-primary) !important;
}
// 普通样式文本
.qilin-text-info{
    color:var(--qilin-color-info) !important;
}
// 成功样式文本
.qilin-text-success{
    color:var(--qilin-color-success) !important;
}
// 警告样式文本
.qilin-text-warning{
    color:var(--qilin-color-warning) !important;
}
// 错误样式文本
.qilin-text-error{
    color:var(--qilin-color-error) !important;
}

// 主题样式背景色
.qilin-bg-primary{
    background-color:var(--qilin-color-primary-shadow) !important;
    color:var(--qilin-color-primary) !important;
}
// 普通样式背景色
.qilin-bg-info{
    background-color:var(--qilin-color-info-shadow) !important;
    color:var(--qilin-color-info) !important;
}
// 成功样式背景色
.qilin-bg-success{
    background-color:var(--qilin-color-success-shadow) !important;
    color:var(--qilin-color-success) !important;
}
// 警告样式背景色
.qilin-bg-warning{
    background-color:var(--qilin-color-warning-shadow) !important;
    color:var(--qilin-color-warning) !important;
}
// 错误样式背景色
.qilin-bg-error{
    background-color:var(--qilin-color-error-shadow) !important;
    color:var(--qilin-color-error) !important;
}

// 圆角样式
.qilin-radius-default{
    border-radius:base.$radius-default !important;
}
.qilin-radius-box{
    border-radius:base.$radius-box !important;
}
.qilin-radius-elliptic{
    border-radius:base.$radius-elliptic !important;
}
.qilin-radius-circle{
    border-radius:base.$radius-circle !important;
}

// 字体加粗等样式
.qilin-text-bolder{
    font-weight:bolder !important;
}
.qilin-text-normal{
    font-weight:normal !important;
}
.qilin-text-lighter{
    font-weight:lighter !important;
}

// 字体大小样式类
.qilin-text-mini{
	font-size:base.$mini-text-size !important;
}
.qilin-text-small{
	font-size:base.$small-text-size !important;
}
.qilin-text-default{
	font-size:base.$default-text-size !important;
}
.qilin-text-medium{
	font-size:base.$medium-text-size !important;
}
.qilin-text-large{
	font-size:base.$large-text-size !important;
}

// 定位样式类
.qilin-position-relative{
	position:relative !important;
}
.qilin-position-absolute{
	position:absolute !important;
}
.qilin-position-static{
	position:static !important;
}
.qilin-position-fixed{
	position:fixed !important;
}

// 背景阴影样式
.qilin-shadow{
    box-shadow:0.02rem 0.02rem 0.05rem var(--qilin-color-shadow) !important;
}
